﻿#ifndef INPUT_H
#define INPUT_H

#include <QCamera>
#include <QCameraViewfinder>
#include <QTime>
#include <QDebug>
#include <QMessageBox>
#include <QCameraInfo>
#include <QCameraImageCapture>
#include <QMainWindow>

#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlDriver>
#include <QSqlRecord>
#include <QSqlQuery>
#include <QApplication>
#include <QDebug>
#include <QSqlTableModel>

#include <iostream>
#include <FaceEngine.h>  //封装过的引擎
#include <FaceTracker.h> //跟踪
#include <FaceLandmarker.h> //标记
#include <opencv.hpp>
#include <FaceDetector.h>
#include <FaceDatabase.h>
#include <QMap>
#include <Struct.h>
//opencv主要是用来处理图像---图形处理算法（算法库）
//Mat存储处理的数据
using namespace  seeta;
using namespace std;
using namespace cv;  //添加opencv的命名空间
#pragma execution_character_set("utf-8")

namespace Ui {
class Input;
}

class Input : public QMainWindow
{
    Q_OBJECT

public:
    explicit Input(QWidget *parent = nullptr);
    ~Input();
    //人脸识别
    //模型
    static ModelSetting FLMsetting;
    static ModelSetting FDsetting;
    static ModelSetting FDBsetting;

private slots:
    void on_holdBt_clicked();

    void on_startBt_clicked();

    void on_stopBt_clicked();

    void on_photoBt_clicked();

    void on_lookBt_clicked();
    void on_pushButton_clicked();

private:
    Ui::Input *ui;
    void cheeck_Seeta();
    void timerEvent(QTimerEvent *event);
    //人脸识别
    //创建标记
    FaceLandmarker *FLDPtr;
    //人脸检查
    FaceDetector  *FDPtr;
    //opencv摄像头
    VideoCapture capture;
    //创建face引擎
    FaceEngine engine;
    //创建跟踪对象
    FaceTracker  faceTracker;
    SeetaImageData regData;
    std::vector<SeetaPointF> regPoints;
    QMap<int , QString> users;
    int timerid;
    Mat videoImage ;
    QSqlTableModel *model;
    bool select_user(QString number);
};

#endif // INPUT_H
